package com.baiye.www.message;

import lombok.Data;

/**
 * @author GUOZHIPENG
 * @version 1.0
 * @date 2021/12/1 20:34
 */
@Data
public class RpcRequestMessage extends Message {
    //接口名
    private String interfaceName;

    //方法名
    private String methodName;

    //参数内容
    private Object[] args;

    //参数类型
    private Class[] argTypes;

    //返回类型
    private Class<?> returnType;

    public RpcRequestMessage(long sequenceId,String interfaceName, String methodName, Class<?> returnType, Class[] argTypes, Object[] args) {
        super.setSequenceId(sequenceId);
        this.interfaceName = interfaceName;
        this.methodName = methodName;
        this.returnType = returnType;
        this.argTypes = argTypes;
        this.args = args;
    }


    @Override
    public int getMessageType() {
        return RPC_MESSAGE_TYPE_REQUEST;
    }
}
